package com.xuelang.pipeline.client.project.enums;

import com.xuelang.pipeline.client.common.exception.BizException;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * <p>项目状态枚举</p>
 *
 * @author : yixin.lys
 * @date : 2024-09-03 15:30
 **/
@NoArgsConstructor
public enum ProjectStatus {

    NOT_START,
    RUNNING,
    FINISH;

    public static ProjectStatus fromOrdinal(Integer ordinal){
        for(ProjectStatus status : ProjectStatus.values()){
            if(status.ordinal() == ordinal){
                return status;
            }
        }
        throw new BizException("没有符合的枚举");
    }

}
